home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / kfilesharedlg.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-10-10  |  1.9 KB  |  68 lines

  1. /* This file is part of the KDE project
  2.    Copyright (c) 2001 David Faure <david@mandrakesoft.com>
  3.    Copyright (c) 2001 Laurent Montel <lmontel@mandrakesoft.com>
  4.  
  5.    This library is free software; you can redistribute it and/or
  6.    modify it under the terms of the GNU Library General Public
  7.    License version 2 as published by the Free Software Foundation.
  8.  
  9.    This library is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12.    Library General Public License for more details.
  13.  
  14.    You should have received a copy of the GNU Library General Public License
  15.    along with this library; see the file COPYING.LIB.  If not, write to
  16.    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  17.    Boston, MA 02110-1301, USA.
  18. */
  19.  
  20. #ifndef kfilesharedlg_h
  21. #define kfilesharedlg_h
  22.  
  23. #include <kpropertiesdialog.h>
  24. class QVBoxLayout;
  25. class QRadioButton;
  26. class QPushButton;
  27.  
  28. /**
  29.  * This plugin provides a page to KPropsDlg, showing the "file sharing" options
  30.  * @author David Faure <david@mandrakesoft.com>
  31.  * @since 3.1
  32.  */
  33. class KIO_EXPORT KFileSharePropsPlugin : public KPropsDlgPlugin
  34. {
  35.     Q_OBJECT
  36. public:
  37.     KFileSharePropsPlugin( KPropertiesDialog *_props );
  38.     virtual ~KFileSharePropsPlugin();
  39.  
  40.     /**
  41.      * Apply all changes to the file.
  42.      * This function is called when the user presses 'Ok'. The last plugin inserted
  43.      * is called first.
  44.      */
  45.     virtual void applyChanges();
  46.  
  47.     static bool supports( const KFileItemList& items );
  48.  
  49.     QWidget* page() const;
  50.  
  51. protected slots:
  52.     void slotConfigureFileSharing();
  53.     void slotConfigureFileSharingDone();
  54.  
  55. private:
  56.     void init();
  57.     bool setShared( const QString&path, bool shared );
  58.  
  59.     QWidget *m_widget;
  60.     QRadioButton *m_rbShare;
  61.     QRadioButton *m_rbUnShare;
  62.     QPushButton *m_pbConfig;
  63.     class Private;
  64.     Private *d;
  65. };
  66.  
  67. #endif
  68.